import java.lang.reflect.Array;
import java.util.Arrays;
import java.util.Random;
import java.util.Scanner;

public class Test1 {
    /*public static void main(String[] args) {
        boolean keepRunning = true;
        int count = 0;
        while (keepRunning) {
            System.out.println("Count: " + count);
            count++;
            if (count >= 5) {
                keepRunning = false;
            }
        }
    }*/
    //public static void main(String[] args) {
        /*int a = 1;
        int b = 2;
        System.out.println((float)a/b);
        float c =1.5F;
        int d = a;
        System.out.println(d);*/
        /*int a = 10;
        a = 20;
        System.out.println(a);*/
        /*int a = 10;
        long b = 10L;
        b = a;*/
        /*float a = 10.5F;
        int b = (int)a;
        System.out.println(b);
        System.out.println(b = (int)a);*/
    //String a = 10 + 20 + "x";
    //System.out.println(a);

    //
        /*int a = 5; int b = 3;
        int max = (a > b)? a : b;
        System.out.println(max);*//*
        int a = 10;
        int b = 20;
        System.out.println(a | b);
        boolean c = true;
        boolean d = false;
        System.out.println(c & d);
        int f = 20;
        int g = ~f;
        System.out.println(g);*/
        /*int a = 10;
        int b = 20;
        int max = a > b? a:b;*/
    //判断一个数是奇数还是偶数
        /*Scanner scanner = new Scanner(System.in);
        System.out.println("请输入一个数，判断是奇数还是偶数");*/
        /*while(scanner.hasNextInt()){
            int scan = scanner.nextInt();
            if(scan % 2 == 0){
                System.out.println("是偶数");
            }
            else {
                System.out.println("是奇数");

            }
        }*/
        /*while(scanner.hasNextInt()){
            int scan = scanner.nextInt();
            if(scan > 0){
                System.out.println("是正数");
            }
            else if(scan == 0){
                System.out.println("0");
            }
            else{
                System.out.println("是负数");
            }
        }*/
        /*while(scanner.hasNextInt()){
            int scan = scanner.nextInt();
            if(((scan % 4 == 0)&&(scan % 100 != 0)) ||(scan % 400 == 0)){
                System.out.println("是闰年");
            }
            else{
                System.out.println("不是闰年");
            }
        }*/
        /*while(scanner.hasNextInt()){
            int scan = scanner.nextInt();
        switch(scan){
            case 1:
                System.out.println("星期一");
                break;
            case 2:
                System.out.println("星期二");
                break;
            case 3:
                System.out.println("星期三");
            case 4:
                System.out.println("星期四");

        }
        }*/
        /*int num = 1;
        while(num <= 10){
            System.out.println(num);
            num++;
        }*/
        /*int num = 1;
        int sum = 0;
        while(num <= 100){
            sum += num;
            num++;
        }
        System.out.println(sum);*/
        /*int num = 1;
        int fac = 1;
        while(num <= 5){
            fac *= num;
            num++;
        }
        System.out.println(fac);*/
//        int num = 100;
//        while(num <= 200){
//            if(num % 3 == 0){
//                System.out.println(num);
//                break;
//            }
//            num++;
//        }


                /*for (int i = 1; i <= 10; i++) {
                   // 使用 print 方法输出数字，不换行
                   System.out.print(i + " ");

                }*/
       /* int sum = 0;
        for (int i = 1; i <= 100 ; i++) {
            sum += i;
        }
        System.out.println(sum);*/
        /*Random random = new Random();
        Scanner scanner = new Scanner(System.in);
        int toGuess = random.nextInt(100);*/
        /*int a = 5;
        System.out.println(fac(a));


    }
    public static int fac(int n) {
        System.out.println("计算 n 的阶乘中n! = " + n);
        int result = 1;
        for (int i = 1; i <= n; i++) {
            result *= i;
        }
        return result;
    }

    }*/


    /*class Test2{
        public static void main(String[] args) {
            boolean keepRunning = true;
            int count = 0;
            while (keepRunning) {
                System.out.println("Count: " + count);
                count++;
                if (count >= 5) {
                    keepRunning = false;
                }
            }
        }
    }*/
    /*public static int fac(int n){
        if (n == 0 || n == 1) {
            return 1;
        }
        return n * fac(n - 1);
    }*/
    /*public static int fac(int n){
        if(n == 1) {
        return 1;
        }
        return n + fac(n - 1);
        }*/
    /*public static void func(int[] a){
        a[0] = 10;
        System.out.println("a[0]=" + a[0]);
    }*/


    public static void main(String[] args) {
        /*int a = 5;
        System.out.println(fac(a));*/
        /*int[] n = {1 , 2 , 3};
        int[] array2 = new int[10];
        for (int i = 0; i < n.length; i++) {
            System.out.printf(n[i] + " ");
        }
        for (int x:n) {
            System.out.printf(x + " ");
        }*/
        /*int[] arr ={1,2,3};
        func(arr);
        System.out.println("arr[0]=" + arr[0]);*/
        /*int[] arr = {3,1,5,8,4};
        int[] arr1 = new int[3];
        arr[0] = 3;
        String[] arr2 = new String[3];
        arr2[0] = "alice";
        Arrays.sort(arr);
        for (int x:arr
             ) {
            System.out.print(x + " ");

        }
        System.out.println(Arrays.toString(arr));*/
        int[] arr = {1 ,2 ,3,4,5};
        int[] newArr = arr;
        newArr[0] = 10;
        for (int x:arr
             ) {
            System.out.print(x + " ");

        }
        int[] newArray1 = Arrays.copyOf(arr , arr.length);
        System.out.println();
        int[] newArray2 = Arrays.copyOf(arr , arr.length - 1);
        for (int a:newArray2
             ) {

            System.out.print(a + " ");

        }

    }
}


